<template>
  <n-space>
    <v-md-editor v-model="code" mode="preview" default-fullscreen="true" />
  </n-space>
</template>

<script>
import useWindowSize from "../composables/useWindowSize";
import { onMounted, ref } from "vue";
import IPC from "../background/ipc";

export default {
  name: "VGPreviewContent",
  props: {},

  setup() {
    const code = ref("");
    const { innerHeight, innerWidth } = useWindowSize();

    onMounted(async () => {
      let result = await IPC.invoke("about.about", {});
      code.value = result.data;
    });

    return {
      code: code,
      innerHeight,
      innerWidth,
    };
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss"></style>
